package com.li.flink.datastream

import org.apache.flink.streaming.api.scala.StreamExecutionEnvironment

object SinkOp {
  def main(args: Array[String]): Unit = {

    val env = StreamExecutionEnvironment.getExecutionEnvironment
    //连接socket
    val text = env.socketTextStream("bigdata04", 9001)
    text.print().setParallelism(2) //设置print并行度
    //处理数据
    env.execute("SinkOp")
  }
}
